import Vue from 'vue'
import Router from 'vue-router'
import Main from './views/Main.vue'
import Home from './views/home/Home.vue'
import List from './views/list/List.vue'
import Detail from './views/detail/Detail.vue'
import Component from './views/detail/Component.vue'
import Template from './views/detail/Template.vue'
import Component1 from './views/materials/component/component1/Component1.vue'
import Component2 from './views/materials/component/component2/Component2.vue'
import Component3 from './views/materials/component/component3/Component3.vue'
import Page1 from './views/materials/page/page1/Page1.vue'
import Example1 from './views/materials/example/example1/Example1.vue'
import Example2 from './views/materials/example/example2/Example2.vue'
import Example3 from './views/materials/example/example3/Example3.vue'
import Page2 from './views/materials/page/page2/Page2.vue'
import Login1 from './views/materials/page/page2/Login1.vue'
import Page3 from './views/materials/page/page3/Page3.vue'
import Login2 from './views/materials/page/page3/Login2.vue'
import Page4 from './views/materials/page/page4/Page4.vue'
import Login3 from './views/materials/page/page4/Login3.vue'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'main',
      redirect: '/home',
      component: Main,
      children: [
        { path: 'home', title: '首页', name: 'home', component: Home },
        { path: 'list', title: '物料中心', name: 'list', component: List },
        { path: 'detail', title: '物料详情', name: 'detail', component: Detail },
        { path: 'component', title: '物料详情 - 组件', name: 'component', component: Component },
        { path: 'template', title: '物料详情 - 页面模版', name: 'template', component: Template },
        { path: 'component/1', title: '页面组件 - 轮播图1', name: 'c1', component: Component1 },
        { path: 'component/2', title: '页面组件 - 轮播图2', name: 'c2', component: Component2 },
        { path: 'component/3', title: '页面组件 - 产品组件1', name: 'c3', component: Component3 },
        { path: 'page/1', title: '页面模版 - 分类栏1', name: 'p1', component: Page1 },
        { path: 'example/1', title: '应用示例 - 柱状图表', name: 'e1', component: Example1 },
        { path: 'example/2', title: '应用示例 - 线性图表', name: 'e2', component: Example2 },
        { path: 'example/3', title: '应用示例 - 暗黑风格图表', name: 'e3', component: Example3 },
        { path: 'page/2', title: '页面模版 - 登录注册页1', name: 'p2', component: Page2 },
        { path: 'page/3', title: '页面模版 - 登录注册页2', name: 'p3', component: Page3 },
        { path: 'page/4', title: '页面模版 - 登录注册页2', name: 'p4', component: Page4 },
      ]
    },
    { path: '/page/2/detail', title: '页面模版 - 登录注册页1', name: 'login1', component: Login1 },
    { path: '/page/3/detail', title: '页面模版 - 登录注册页2', name: 'login2', component: Login2 },
    { path: '/page/4/detail', title: '页面模版 - 登录注册页3', name: 'login3', component: Login3 },
  ]
})
